package com.mall.permission.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mall.permission.model.RolePermission;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * URL权限关系对应 服务类
 * </p>
 *
 * @author Darren
 * @since 2022-10-20
 */
public interface IRolePermissionService extends IService<RolePermission> {
    /**
     * 新增
     *
     * @param brand
     * @return
     */
    boolean addRolePermission(RolePermission rolepermission);

    /**
     * 更新
     *
     * @param brand
     * @return
     */
    boolean updateRolePermission(RolePermission rolepermission);

    /**
     * 根据条件查询全部数据
     *
     * @param brand
     * @return
     */
    List<RolePermission> selectList(RolePermission rolepermission);

    /**
     * 分页查询
     *
     * @param brand
     * @return
     */
    Page<RolePermission> selectPage(Page<RolePermission> page, RolePermission rolepermission);

    /**
     * 所有角色的权限映射
     *
     * @return
     */
    List<Map<String, String>> allRolePermissions();
}
